#
#    Pixel War (Cliente) - Cliente de Juego Multiplayer Online
#    Copyright (C) 2010 - Francisco Rivera
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

from ogl_entidades import Text
from constantes import C_JUG_A, C_JUG_R, C_NEGRO
from tools import Singleton

class Score:
   
    __metaclass__ = Singleton
   
    def __init__(self):
        self.cambio = True
        self.azul = 0
        self.rojo = 0
        self.ronda = 0
        
    def set(self, azul, rojo, ronda):
        self.azul = azul
        self.rojo = rojo
        self.ronda = ronda
        self.cambio = True
        print "cambio", azul, rojo, ronda

    def get(self):
        if self.cambio:
            self.cambio = False
            print "nuevas texturas"
            self.srf_azul = Text(str(self.azul) + '|', fontsize=30, color=C_JUG_A)
            self.srf_rojo = Text(str(self.rojo) + '|', fontsize=30, color=C_JUG_R)
            self.srf_rond = Text(str(self.ronda) + '|', fontsize=30, color=C_NEGRO)
        return self.srf_azul, self.srf_rojo, self.srf_rond